using Godot;

[GlobalClass]
public partial class ChessTeam : Resource
{
    [Export]
    public Texture2D jiang, shi, xiang, ma, jv, pao, zu;

    public Texture2D this[ChessType ty] => ty switch
    {
        ChessType.Jiang => jiang,
        ChessType.Shi => shi,
        ChessType.Xiang => xiang,
        ChessType.Ma => ma,
        ChessType.Jv => jv,
        ChessType.Pao => pao,
        ChessType.Zu => zu,
        _ => jiang
    };
}